<?php

namespace app\admin\model;

use think\Model;

/**
 * Branchpiles
 */
class Branchpiles extends Model
{
    // 表名
    protected $name = 'branchpiles';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 字段类型转换
    protected $type = [
        'regtime' => 'timestamp:Y-m-d H:i:s',
    ];


    public function branch(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\Branch::class, 'branch_id', 'id');
    }
}